const dialog = {}
dialog.warning = (options = {
    title: '提示',
    content: '此操作将永久删除该数据, 是否继续?',
    positiveText: '确定',
    negativeText: '取消',
    onPositiveClick: () => {
        request({
            url: url,
            method: 'delete',
            params: {
                id: id
            }
        }).then(() => {
            $message.success('删除成功')
            options && options.done()
        })
    }
}) => {
    uni.showModal({
        ...options,
        success() {
            options.onPositiveClick()
        }

    })

}

export default dialog;